package imnu0713;

/**
 * @author:lys
 * @类名:test_02
 * @Title:运算符
 * @date:2020/7/14
 **/
public class test_02 {
    public static void main(String[] args) {
        int iNum_01 = 3;
        int iNum_02 = 5;
        int iNum_03;
        int iNum_04;
        int iNum_05;
        System.out.println("算术运算符：");
        iNum_03 = iNum_01+iNum_02;
        System.out.println("iNum_03的值："+iNum_03);
        iNum_04 = iNum_02/iNum_01;
        System.out.println("iNum_04的值："+iNum_04);
        iNum_05 = iNum_02%iNum_01;
        System.out.println("iNum_05的值："+iNum_05);
        //Q:想要7除以2等于3.5怎么办？
        System.out.println("算数运算符结束！");
        System.out.println("------------------");
        System.out.println("比较运算符：");
        boolean ok;
        ok = iNum_02>iNum_01;
        System.out.println("ok:"+ok);
        boolean ok1;
        ok1 = iNum_01==iNum_02;
        System.out.println("ok1:"+ok1);
        System.out.println("比较运算符结束！");
        System.out.println("------------------");
        System.out.println("逻辑运算符：");
        boolean ok2;
        ok2 = (iNum_02>iNum_01)&&(iNum_01==4);
        System.out.println("ok2:"+ok2);
        boolean ok3;
        ok3 = (iNum_02>iNum_01)||(iNum_01==5);
        System.out.println("ok3:"+ok3);
        ok3 = !ok3;
        System.out.println("ok3:"+ok3);
        //Q:逻辑短路
        System.out.println("逻辑运算符结束！");
        System.out.println("------------------");
        int iNum_06;
        iNum_01 = (iNum_01+=5);
        System.out.println("iNum_01:"+iNum_01);

    }
}
